<cfsetting enablecfoutputonly="Yes">

<!--- 
  /**
   * @author  <info@mireau.net>
   * @version 1.0 - <yyyy/mm/dd>
   */
--->

<cfsetting enablecfoutputonly="No">


<cfif not directoryExists( "#request.site.s_ANCHOR_PATH#/www/#attributes.sDir#" )>
  <cfmodule template="#request.site.s_CFROOT#/lib/customtags/border.cfm">
    <p>
      This is a summary of the actions that will be taken when you decide to 
      continue to create this directory.
    </p>
  
    <ul>
      <li>
        Create directory '<code style="color: #cc0000; font-weight: bold;"><cfoutput>#request.site.s_ANCHOR_PATH#/www/#attributes.sDir#</cfoutput></code>'
      </li>
    
      <cffile 
        action="READ" 
        file="#request.site.s_ANCHOR_PATH#/lib/templates/system/_index_.tpl"
        variable="local.sFileContents"
      >
      
      <cfscript>
        local.sDate = datePart( "yyyy", now()) & "/" &
                      numberFormat( datePart( "m", now()), "00" ) & "/" &
                      numberFormat( datePart( "d", now()), "00" );
                      
        local.sFileContents = replace( local.sFileContents, "%[EMAIL_ADDRESS]%",  "info@mireau.nl", "all" );
        local.sFileContents = replace( local.sFileContents, "%[DATE]%",           local.sDate, "all" );
      </cfscript>
    
      <li>
        Create file 
        '<code style="color: #cc0000; font-weight: bold;"><cfoutput>#request.site.s_ANCHOR_PATH#/www/#attributes.sDir#/index.cfm</cfoutput></code>'
        with the following contents:<br/><br/>
        <pre><cfoutput>#htmlEditFormat( local.sFileContents )#</cfoutput></pre>
      </li>
    </ul>
    
    <p>Do you want to proceed?</p>

    <hr/>
    
    <form 
      action="<cfoutput>#request.site.s_WEBROOT#</cfoutput>/system/index.cfm" 
      method="post" 
      name="f" 
      id="f"
    >
      <input type="hidden" name="fuseaction" value="adddir">
      <input type="hidden" name="sDir"       value="<cfoutput>#attributes.sDir#</cfoutput>">
    
      <input type="button" class="button" value="back" onClick="history.back( -1 );">
      <input type="submit" class="button" value="proceed">
    </form>
  </cfmodule>
<cfelse>
  <cflocation url="#request.site.s_WEBROOT#/?nStatus=#request.status.n_DIR_ALREADY_EXISTS#" addtoken="no">
</cfif>
